home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD023b.dsk
/
HI-RES EVOLUTION.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
4KB
|
100 lines
10 TEXT : HOME : LOMEM: 4 *4096
20 VTAB 5:P$ = "*****************": GOSUB 120
30 VTAB 6:P$ = "* *": GOSUB 120
35 VTAB 7:P$ = "* HI-RES *": GOSUB 120
40 VTAB 8:P$ = "* EVOLUTION *": GOSUB 120
50 VTAB 9:P$ = "* *": GOSUB 120
60 VTAB 10:P$ = "*****************": GOSUB 120
70 VTAB 15: HTAB 9: PRINT "PRESS SPACE TO START."
80 E = INT( RND(1) *20) +7:K = PEEK( -16384): IF K <128 THEN 80
90 POKE -16368,0: HOME
100 GOTO 130
110 XDRAW 1 AT FN PC(X), FN PC(Y): RETURN
120 PRINT TAB( 20 - LEN(P$)/2);P$: RETURN
130 FOR I = 1 TO 3000: NEXT I
140 GOSUB 850
150 DEF FN NX(X) = 35 *(X <0) +X *(X <35)
160 DEF FN NY(Y) = 20 *(Y <0) +Y *(Y <20)
170 DEF FN PC(Z) = 8 *Z +4
180 DIM P%(34,19),N%(34,19),D%(34,19)
190 DIM CL%(734),DL%(734)
210 HGR :NM = 0
220 GOSUB 830
240 GOTO 370
250 NC = 0:ND = 0:NG = NG +1: HOME
255 POKE 49168,0: IF PEEK(49152) = 27 THEN PRINT : PRINT CHR$(4)"RUNMENU"
260 X = 0
270 FOR I = 1 TO CN
280 Y = CL%(I): IF Y <0 THEN X = X +1: GOTO 360
290 GOSUB 110
300 D = DL%(I)
310 N = N%(X,Y) +D:N%(X,Y) = N
320 IF P%(X,Y) THEN ON N GOTO 340,340,350,350,340,340,340,340,340
330 IF N < >3 THEN 350
340 GOSUB 430
350 GOSUB 110
360 NEXT I
370 FOR I = 1 TO E
380 X = INT( RND(1) *35)
390 Y = INT( RND(1) *20)
400 GOSUB 430
410 NEXT I
420 GOSUB 700: GOTO 250
430 XDRAW 2 AT FN PC(X), FN PC(Y)
440 P%(X,Y) = 1 -P%(X,Y)
450 D = -1: IF P%(X,Y) THEN D = 1
460 IF X = 0 OR X = 34 OR Y = 0 OR Y = 19 THEN 640
470 D%(X -1,Y -1) = D%(X -1,Y -1) +D
480 D%(X -1,Y) = D%(X -1,Y) +D
490 D%(X -1,Y +1) = D%(X -1,Y +1) +D
500 D%(X,Y -1) = D%(X,Y -1) +D
510 D%(X,Y) = D%(X,Y) +D
520 D%(X,Y +1) = D%(X,Y +1) +D
530 D%(X +1,Y -1) = D%(X +1,Y -1) +D
540 D%(X +1,Y) = D%(X +1,Y) +D
550 D%(X +1,Y +1) = D%(X +1,Y +1) +D
560 NM = NM +D
570 NC = NC +1
580 ND = ND +D
590 IF X <XL THEN XL = X
600 IF Y <YL THEN YL = Y
610 IF X >XH THEN XH = X
620 IF Y >YH THEN YH = Y
630 RETURN
640 FOR X2 = X -1 TO X +1
650 FOR Y2 = Y -1 TO Y +1
660 X3 = FN NX(X2):Y3 = FN NY(Y2)
670 D%(X3,Y3) = D%(X3,Y3) +D
680 NEXT : NEXT
690 GOTO 560
700 CN = 0
710 XL = FN NX(XL -1):XH = FN NX(XH +1): IF XL > = XH THEN I = XL:XL = XH:XH = I: IF XL = 0 OR XH = 34 THEN XL = 0:XH = 34
720 YL = FN NY(YL -1):YH = FN NY(YH +1): IF YL > = YH THEN I = YL:YL = YH:YH = I: IF YL = 0 OR YH = 19 THEN YL = 0:YH = 19
730 IF XL = 0 THEN 750
740 FOR I = 0 TO XL -1:CN = CN +1:CL%(CN) = -1: NEXT
750 FOR X = XL TO XH: FOR Y = YL TO YH
760 IF NOT D%(X,Y) THEN 800
770 D = D%(X,Y)
780 CN = CN +1:D%(X,Y) = 0
790 CL%(CN) = Y:DL%(CN) = D
800 NEXT
810 CN = CN +1:CL%(CN) = -1
820 NEXT
830 XL = 34:XH = 0:YL = 19:YH = 0
840 RETURN
850 POKE 768,2: POKE 769,0: POKE 770,6: POKE 771,0:
860 POKE 772,35: POKE 773,0: POKE 774,8: POKE 775,8:
870 POKE 776,8: POKE 777,54: POKE 778,54: POKE 779,54:
880 POKE 780,39: POKE 781,36: POKE 782,36: POKE 783,60:
890 POKE 784,54: POKE 785,54: POKE 786,54: POKE 787,39:
900 POKE 788,36: POKE 789,36: POKE 790,60: POKE 791,54:
910 POKE 792,54: POKE 793,54: POKE 794,39: POKE 795,36:
920 POKE 796,36: POKE 797,60: POKE 798,54: POKE 799,54:
930 POKE 800,54: POKE 801,95: POKE 802,0: POKE 803,8:
940 POKE 804,8: POKE 805,200: POKE 806,59: POKE 807,247:
950 POKE 808,30: POKE 809,54: POKE 810,14: POKE 811,14:
960 POKE 812,45: POKE 813,12: POKE 814,12: POKE 815,36:
970 POKE 816,28: POKE 817,92: POKE 818,0:
980 POKE 232,0: POKE 233,3
990 HCOLOR= 3: SCALE= 1: ROT= 0
1000 RETURN